// 自动生成模板Patient
package patients

import (
	"github.com/flipped-aurora/gin-vue-admin/server/global"
	"time"
)

// patient表 结构体  Patient
type Patient struct {
	global.GVA_MODEL
	PatientCardNum *int       `json:"patientCardNum" form:"patientCardNum" gorm:"column:patient_card_num;comment:就诊卡号;size:10;" binding:"required"` //就诊卡号
	Name           *string    `json:"name" form:"name" gorm:"index;column:name;comment:患者姓名;size:30;" binding:"required"`                           //患者姓名
	Sex            *string    `json:"sex" form:"sex" gorm:"column:sex;comment:性别;size:20;"`                                                         //性别
	Mobile         *string    `json:"mobile" form:"mobile" gorm:"uniqueIndex;column:mobile;comment:手机号码;size:20;" binding:"required"`               //手机号码
	PatientImage   string     `json:"patientImage" form:"patientImage" gorm:"column:patient_image;comment:患者头像;"`                                   //患者头像
	HaveHastile    *string    `json:"haveHastile" form:"haveHastile" gorm:"column:have_hastile;comment:是否有遗传病史;size:20;"`                           //是否有遗传病史
	CardType       *string    `json:"cardType" form:"cardType" gorm:"column:card_type;comment:证件类型;size:20;"`                                       //证件类型
	Borthid        *time.Time `json:"borthid" form:"borthid" gorm:"column:borthid;comment:出生年月;"`                                                   //出生年月
	Age            *int       `json:"age" form:"age" gorm:"column:age;comment:年龄;size:10;"`                                                         //年龄
	People         *string    `json:"people" form:"people" gorm:"column:people;comment:民族;size:20;"`                                                //民族
	Status         *string    `json:"status" form:"status" gorm:"column:status;comment:状态;size:20;"`                                                //状态
	CardNum        *string    `json:"cardNum" form:"cardNum" gorm:"column:card_num;comment:证件号码;size:20;"`                                          //证件号码
	HyStatus       *string    `json:"hyStatus" form:"hyStatus" gorm:"column:hy_status;comment:婚姻情况;size:20;"`                                       //婚姻情况
	Address        *string    `json:"address" form:"address" gorm:"column:address;comment:通讯地址;size:50;"`                                           //通讯地址
	Doctor         *string    `json:"doctor" form:"doctor" gorm:"column:doctor;comment:操作人员;size:30;"`                                              //操作人员
	Menu           *string    `json:"menu" form:"menu" gorm:"column:menu;comment:备注;"`                                                              //备注
	CreatedBy      uint       `gorm:"column:created_by;comment:创建者"`
	UpdatedBy      uint       `gorm:"column:updated_by;comment:更新者"`
	DeletedBy      uint       `gorm:"column:deleted_by;comment:删除者"`
}

// TableName patient表 Patient自定义表名 patient
func (Patient) TableName() string {
	return "patient"
}

type Department struct {
	ID   uint   `gorm:"primarykey" json:"ID"` // 主键ID
	Name string `json:"Name" gorm:"index;column:name;comment:科室名称;size:30;"`
}

func (Department) TableName() string {
	return "department"
}
